#include <iostream>
#include "libpear_option.h"


extern "C" {


static void get_mac_func(void *arg)
{
	std::cout << "--->mac: " << (char *)arg << std::endl;
}

static void install_path_func(void *arg)
{
	std::cout << "--->install_path: " << (char *)arg << std::endl;
}

static void cache_path_func(void *arg)
{
	std::cout << "--->cache_path: " << (char *)arg << std::endl;
}

static void conf_path_func(void *arg)
{
	std::cout << "--->conf_path: " << (char *)arg << std::endl;
}

static void log_path_func(void *arg)
{
	std::cout << "--->log_path: " << (char *)arg << std::endl;
}

unsigned long pear_version(void)
{
	return 8001002;
}

int pear_main(int argc, char *argv[])
{
	
	libpear_option_info_t option_info[] = {
		{"mac", get_mac_func}, 
		{"install_path", install_path_func}, 
		{"cache_path", cache_path_func},
		{"conf_path", conf_path_func},
		{"log_path", log_path_func}
	};

	pear_getopt(argc, argv, option_info, sizeof(option_info) / sizeof(option_info[0]));

	return 0;
}


} // end extern "C"



